home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / comm / irc / KuangEleven3Gm.lha / Kuang Eleven 3 / Rexx / CTCP / Getsound.amirx < prev    next >
Text File  |  1998-05-09  |  807b  |  26 lines

  1. /* $VER: Getsound.amirx 1.0 (9.5.98) Kuang Eleven Plugin : GETSOUND command to send sounds on ctcp request
  2. *   Requires AmIRC 1.30!
  3. */
  4. options results
  5. parse arg ':'prefix' 'type' 'channel' :'text
  6. parse var prefix nick'!'user'@'host
  7. div='01'x
  8. parse var text (div) command file . (div)
  9. if upper(command)~='GETSOUND' then exit
  10. if file~==compress(file,'/:`"*') then exit
  11. "GETCTCPSOUNDDIR"
  12. fullfile=prsprg(result)||file
  13. if ~exists(fullfile) then cecho('Unable to send' d2c(2)file||d2c(2) 'to' d2c(2)nick||d2c(2))
  14. else do
  15.     'SAY /DCC SEND' nick fullfile
  16.     cecho('Sent' d2c(2)file||d2c(2) 'to' d2c(2)nick||d2c(2))
  17. end
  18. exit
  19. prsprg:PROCEDURE
  20. X=addpart(ARG(1),'')
  21. "GETPROGDIR"
  22. Y=RESULT
  23. IF UPPER(LEFT(X,8))='PROGDIR:' THEN RETURN addpart(Y,'')||SUBSTR(X,9)
  24. RETURN X
  25. cecho:;"ECHO P="d2c(27)"b«SendSound»" arg(1);return 0
  26.